package proxy.dynamic.v5;


public class Test {

    public static void main(String[] args) {
        CalcServiceProxy<Integer, Integer, Integer> calcServiceProxy = new CalcServiceProxy<>((a, b) -> a - b);
        CalcService<Integer, Integer, Integer> calcService = calcServiceProxy.newInstance(CalcService.class);
        System.out.println(calcService.execute(1, 5));

        CalcServiceProxy<String, String, String> calcServiceProxy1 = new CalcServiceProxy<>((a, b) -> a.toUpperCase());
        CalcService<String, String, String> calcService1 = calcServiceProxy1.newInstance(CalcService.class);
        System.out.println(calcService1.execute("zhangsan", "lisi"));
    }
}
